const express = require('express')
const static = require('./static')
const app = express()

app.get('/', (req, res, next) => {
    res.send('hello world')
})
// 不限定请求路径前缀
app.use(static("./assets"));  //http://localhost:3356/imgs/d1.jpg
// app.use(static("./node_modules"));

// 限定请求路径前缀
// app.use("/public", static("./assets")); //http://localhost:3356/public/imgs/d1.jpg
// app.use("/node_modules", static("./node_modules"));

app.listen(3356, () => {
    console.log('已启动3356端口')
})